html,
body {
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
}
#app {
  width: 100%;
  height: 100%;
}

@include b(app-wrapper) {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

@include b(app-header) {
  height: $header-height;
  padding: 0 20px;
  position: relative;
  font-size: 15px;
  @include themify() {
    // background: linear-gradient(270deg, rgba(108, 119, 235, 0) 0%, rgba(106, 151, 221, 0.21) 100%);
    background-color: themed("header-bg");
  }
  @include e(logo) {
    // @include float;
    position: relative;
    font-size: 18px;
    line-height: $header-height;
    color: #fff;
    font-weight: bold;
    letter-spacing: 1px;
    img {
      margin-left: 0px;
      margin-right: 10px;
    }
    .title {
      display: inline-block;
      width: 155px;
      // width: 127px;
      // padding-right: 28px;
    }
    .a-fold-btn {
      cursor: pointer;
    }
  }
  @include e(nav) {
    @include float;
    line-height: $header-height;
    margin-left: 50px;
    li {
      display: inline-block;
      font-size: 15px;
    }
    a {
      @include transition;
      height: $header-height;
      color: #fff;
      padding: 0 15px;
      display: block;
      text-decoration: none !important;
      &.active {
        @include themify() {
          background-color: themed("nav-active");
          color: #fff;
        }
      }
    }
  }
  @include e(info) {
    @include float(right);
    font-size: 16px;
    height: $header-height;
    line-height: $header-height;
    color: #fff;
  }
  .theme {
    .el-dropdown-link {
      color: #fff;
      margin-right: 10px;
    }
  }
}

@include b(app-body) {
  width: 100%;
  flex: 1;
  overflow: auto;
  background-color: #eee;
  display: flex;
  flex-flow: column;
}

@include b(layout-none) {
  @include b(app-body) {
    height: 100%;
  }
  @include b(app-main) {
    flex: 1;
    top: 0;
    left: 0;
  }
}

// .el-menu--light.el-menu--vertical > .el-submenu.is-active > .el-submenu__title {
//   color: #fff;
//   background-color: #1890ff;
// }
// .el-menu--light.el-menu--vertical > .el-submenu.is-active > .el-submenu__title {
//   position: relative;
//   &:before {
//     content: "";
//     position: absolute;
//     left: 0;
//     top: 0;
//     bottom: 0;
//     width: 4px;
//     background: #1890ff;
//   }
// }
.el-menu--light.el-menu--vertical > .el-submenu.is-active > .el-submenu__title:not(.is-disabled):hover {
  color: #fff;
  background-color: #1890ff;
}
@include b(app-sidebar) {
  // background: url('../../imgs/side-bg.png') bottom right no-repeat ;
  @include themify() {
    background-color: themed("nav-bg");
  }
  // position: absolute;
  // top: $header-height;
  // left: 0;
  // bottom: 0;
  width: $sidebar-width;
  flex-shrink: 0;
  // border-right: 1px solid $line;
  // overflow: hidden;
  // padding: 10px 0 0 0;
  .menu-bar {
    // height: calc(100% - 30px);
    background-color: transparent;
    .el-menu-item {
      @include themify() {
        color: themed("nav-color");
      }
      &:hover,
      &:focus {
        @include themify() {
          background-color: themed("nav-active");
          color: themed("nav-hover-color");
        }
      }
      &.is-active {
        @include themify() {
          background-color: themed("nav-active");
          color: #ffffff;
        }
      }
    }
    .el-submenu .el-menu {
      background: none;
      margin-top: 5px;
      // padding-left: 8px;
      .el-menu-item {
        padding: 0 40px; //!important;
        i {
          display: none;
        }
        // padding-left: 48px;
      }
    }

    .el-submenu__title {
      @include themify() {
        color: themed("nav-color");
      }

      &:hover,
      &:focus {
        @include themify() {
          background-color: themed("title");
          color: themed("nav-hover-color");
        }
      }
    }
  }
  &.hide {
    width: $hideSidebar-width;
    .a-fold-btn {
      position: absolute;
      top: 0px;
      right: -20px;
      z-index: 999;
    }
    & ~ .app-main {
      left: $hideSidebar-width;
    }
  }
  .switch {
    cursor: pointer;
    height: 30px;
    line-height: 30px;
    width: 100%;
    text-align: center;
    // border-top: 1px solid $line;
  }
  .el-menu--collapse {
    width: $hideSidebar-width;
  }
}

@include b(app-sidebar) {
  & ~ .app-main {
    left: $sidebar-width;
  }
}

@include b(app-main) {
  // position: absolute;
  // top: $header-height;
  // left: 0;
  // right: 0;
  // bottom: 0;
  position: relative;
  flex: 1;
  overflow: hidden;
  margin: 10px;
  padding: 10px;
  background-color: #fff;
  .content {
    width: 100%;
    height: 100%;
    //采用flex布局，代替calc属性 by link 20211020
    display: flex;
    flex-flow: column;
  }
}
.layout-column {
  flex-direction: column !important;
}
.layout-row {
  flex-direction: row !important;
}

// 两端对齐
.layout-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.layout-wrapper {
  display: flex;
  flex-direction: column;
  overflow: auto;
  height: 100%;
  width: 100%;
  .layout-header {
    @include clear;
  }
  .layout-body {
    display: flex;
    flex: 1;
    overflow: auto;
    // min-height: 300px;
  }
  .layout-auto {
    width: 100%;
    height: 100%;
    overflow: auto;
  }
  .layout-footer {
    padding-top: 10px;
    text-align: center;
  }
  .layout-left {
    @include float;
    margin-bottom: 10px; //2021-8-24 by link 加换行边距
    .item {
      @include float;
    }
    .item + .item {
      margin-left: 20px;
    }
  }
  .layout-right {
    @include float(right);
    .item {
      @include float;
    }
    .item + .item {
      margin-right: 20px;
    }
  }
}
